package com.molyfun.parents.rest.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.molyfun.parents.rest.BaseResponse;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/12/15 0015.
 */

public class RepoetFromsLineListResponse extends BaseResponse{

    private ArrayList<LineListBean> data;

    public ArrayList<LineListBean> getData() {
        return data;
    }

    public void setData(ArrayList<LineListBean> data) {
        this.data = data;
    }

    public static class LineListBean implements Parcelable{
        /**
         * target : 435
         * coursenamelist : [{"id":"8a2d926359bfc9580159c03e688200bd","name":"35","target":"435"}]
         */

        private String target;
        private ArrayList<CoursenamelistBean> coursenamelist;
        private boolean isSelector;

        public boolean isSelector() {
            return isSelector;
        }

        public void setSelector(boolean selector) {
            isSelector = selector;
        }

        public String getTarget() {
            return target;
        }

        public void setTarget(String target) {
            this.target = target;
        }

        public ArrayList<CoursenamelistBean> getCoursenamelist() {
            return coursenamelist;
        }

        public void setCoursenamelist(ArrayList<CoursenamelistBean> coursenamelist) {
            this.coursenamelist = coursenamelist;
        }

        public static class CoursenamelistBean implements Parcelable{
            /**
             * id : 8a2d926359bfc9580159c03e688200bd
             * name : 35
             * target : 435
             */

            private String id;
            private String name;
            private String target;
            private boolean isSelector;

            protected CoursenamelistBean(Parcel in) {
                id = in.readString();
                name = in.readString();
                target = in.readString();
                isSelector = in.readByte() != 0;
            }

            public static final Creator<CoursenamelistBean> CREATOR = new Creator<CoursenamelistBean>() {
                @Override
                public CoursenamelistBean createFromParcel(Parcel in) {
                    return new CoursenamelistBean(in);
                }

                @Override
                public CoursenamelistBean[] newArray(int size) {
                    return new CoursenamelistBean[size];
                }
            };

            public boolean isSelector() {
                return isSelector;
            }

            public void setSelector(boolean selector) {
                isSelector = selector;
            }

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getTarget() {
                return target;
            }

            public void setTarget(String target) {
                this.target = target;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeString(id);
                dest.writeString(name);
                dest.writeString(target);
                dest.writeByte((byte) (isSelector ? 1 : 0));
            }
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.target);
            dest.writeTypedList(this.coursenamelist);
            dest.writeByte(this.isSelector ? (byte) 1 : (byte) 0);
        }

        public LineListBean() {
        }

        protected LineListBean(Parcel in) {
            this.target = in.readString();
            this.coursenamelist = in.createTypedArrayList(CoursenamelistBean.CREATOR);
            this.isSelector = in.readByte() != 0;
        }

        public static final Creator<LineListBean> CREATOR = new Creator<LineListBean>() {
            @Override
            public LineListBean createFromParcel(Parcel source) {
                return new LineListBean(source);
            }

            @Override
            public LineListBean[] newArray(int size) {
                return new LineListBean[size];
            }
        };
    }
}
